package com.itheima.service;

import com.itheima.pojo.Question;
import com.itheima.pojo.Result;
import com.itheima.service.impl.QuestionServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@Component
@FeignClient(value = "search-service",fallback = QuestionServiceImpl.class)
public interface QuestionService {

    /**
     * @Author: Administrator
     * @Date: 17:04 2021/2/4
     * @Parms [question]
     * @ReturnType: com.itheima.pojo.Result
     * @Description: 添加问答-调用搜索服务端接口
    */
    @PostMapping("search/addQuestion")
    Result addQuestion(@RequestBody Question question);
}
